﻿
<!DOCTYPE html>
  <html>
<style>
   #t1{
     height: 35px;
   }

   tr,th,td{
      text-align: center;
   }

</style>

<div class="bjui-pageHeader">
    <!-- 顶部模块[如：功能按钮、搜索面板] -->
      <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/bb214/wipTrackTable" method="post">
          <br class="bjui-searchBar">
             <g:hiddenField name="SYS_QUERY_NAME" value="wipTrackTest" />
             <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />

              <label>调度单开始时间：</label>
              <input type="text" name="start" value="${start}"  data-toggle="datepicker" placeholder="FROM">
              <label>调度单结束时间：</label>
              <input type="text" name="startEnd" value="${startEnd}"  data-toggle="datepicker" placeholder="TO">&nbsp;&nbsp;



              <label >产品型号：</label>&nbsp;&nbsp;
              <g:select name="partName" from="${partNameList}" data-toggle="selectpicker" data-live-search="true" optionKey="PART_NAME" optionValue="PART_NAME" value="${partName}" noSelection="['':'ALL']" /><br>
              <label >调度单号：</label>&nbsp;&nbsp;
              <g:select name="woId" from="${woIdList}"   data-toggle="selectpicker"  data-live-search="true" optionKey="WO_ID" optionValue="WO_ID" value="${woId}" noSelection="['':'ALL']" />&nbsp;
              <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
              <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/bb214/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出</button>
           <br>
       </form>
    <br>
   </div>

<div class="bjui-pageContent tableContent">
    <g:if test="${wipTrackTestList.size() > 0}">
        <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <th width="110">类型</th>
                <th width="110">产品型号</th>
                <th width="110">调度单号</th>
                <th width="110">流程</th>
                <th width="110">成模批号</th>
                <th width="110">组装批号</th>
                <th width="110">封装批号</th>
                <th width="110">投片数量</th>
                <th width="110">出片数量</th>
                <th width="110">总数量</th>
                <th width="110">投入时间</th>
                <th width="110">在线流程周期</th>
                <th width="110">平均周期</th>
            </tr>
            </thead>
            <tbody>
            <tr>
            <g:each in="${wipTrackTestList}" status="i" var="TableInstance">
                    <td>${TableInstance.PART_TYPE}</td>
                <g:if test="${part==null || part != TableInstance.PART_NAME }">
                    <td <g:if test="${part==null||part!=TableInstance.PART_NAME}"> rowspan="${sumList[TableInstance.PART_NAME].size()}" </g:if> >${TableInstance.PART_NAME}</td>
                </g:if>
                    <td>${TableInstance.WO_ID}</td>
                    <td>${TableInstance.PROCESS}</td>
                    <td>${TableInstance.CUSTOMER_ORDER}</td>
                    <td>${TableInstance.CUSTOMER_PART_ID}</td>
                    <td>${TableInstance.CUSTOMER_CODE}</td>
                    <td>${TableInstance.START_ALL_QTY}</td>
                    <td>${TableInstance.END_ALL_QTY}</td>
                <g:if test="${part==null || part != TableInstance.PART_NAME }">
                    <td <g:if test="${part==null||part!=TableInstance.PART_NAME}"> rowspan="${sumList[TableInstance.PART_NAME].size()}" </g:if> >
                            ${sumList[TableInstance.PART_NAME].START_ALL_QTY.sum()}
                    </td>
                </g:if>
                    <td>${TableInstance.START_TIME}</td>
                    <td>${TableInstance.ALL_TIME}</td>
                <g:if test="${part==null||part!=TableInstance.PART_NAME}">
                        <td <g:if test="${part==null||part!=TableInstance.PART_NAME}"> rowspan="${sumList[TableInstance.PART_NAME].size()}"</g:if>>
                            ${TableInstance.AVG_TIME}
                        </td>
                </g:if>
                <g:set var="part" value="${TableInstance.PART_NAME}"></g:set>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel" />
    </g:else>
</div>
  <g:render template="../template/pagination" />
</html>
